home *** CD-ROM | disk | FTP | other *** search
/ Komputer for Alle 2004 E…tra 100 Bedste Programmer / K-CD_2004_Ekstra_100_Gratis_Programmer.iso / Windows / X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ WinNT Browser 1.xpl < prev    next >
Encoding:
XSetup plugin  |  2004-01-15  |  2.9 KB  |  111 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="8"
  3. "COUNT"="2"
  4. "UIPATH"="Network\Server\Computer Browser Service"
  5. "NAME"="Browser Domain List"
  6. "VERSION"="1.03"
  7. "LANGUAGE"="VBScript"
  8. "OSVERSION"="0101011"
  9. "TEXT 1"="Add..."
  10. "TEXT 2"="Remove"
  11. "DESCRIPTION 1"="To log on a domain in Windows, the domain must first be known to the computer browser service."
  12. "DESCRIPTION 2"="This service keeps a list from all known domains in the current network, but is normally limited to domains that are located in the same network."
  13. "DESCRIPTION 3"="For example, if you have a domain in a different location that is only connected through a dial-up line, you will not be able to log on since the computer browser service does simply not know that that domain is available."
  14. "DESCRIPTION 4"="With this setting, you can force the computer browser service to list domains that are not added by default."
  15. "DESCRIPTION 5"="Simply click add and add the NT4-style domain name (e.g. "MyOtherDomain"), or click an existing item to remove it."
  16. "AUTHOR"="Xteq Systems"
  17. "CONTACTURL"="http://www.xteq.com/"
  18. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  19. "COMMENT 1"="Thanks to BadNh3 and Jager-bomb for the W2K3 bug notice!"
  20.  
  21.  
  22. sV="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters\OtherDomains"
  23. 'STR!
  24. iCount=0
  25.  
  26. Sub Plugin_Initialize 
  27.  Call InitListbox
  28. End Sub
  29.  
  30.  
  31. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  32.  if ElementIndex=1 then 'ADD
  33.     s=InputWindow("Please enter the name of domain to be added","",1)
  34.     if IsEmpty(s)=false then
  35.        if Len(s)>0 then
  36.           iCount=iCount+1
  37.           Call SetUIElement(iCount,s)
  38.           Call WriteRegistry()
  39.           Call InitListbox()              
  40.        end if
  41.     end if
  42.  
  43.  elseif ElementIndex=2 then 'REMOVE
  44.    if ElementSubIndex=0 then
  45.       Call MsgError("Please select a domain be to removed")
  46.    else
  47.       Call SetUIElement(ElementSubIndex,"")
  48.       Call WriteRegistry()
  49.       Call InitListbox()
  50.    end if
  51.  end if
  52.  
  53.  
  54. ' Call Logoff()
  55. End Sub
  56.  
  57.  
  58. Sub InitListbox
  59.  for i=1 to iCount
  60.      Call SetUIElement(i,"")
  61.  next
  62.  
  63.  iCount=0
  64.  
  65.  ary=RegReadValue(sV)
  66.  if IsEmpty(ary)=false then
  67.     
  68.     for l=lBound(ary) to ubound(ary)
  69.         s=ary(l)
  70.         s=lcase(s)
  71.         if len(s)>0 then           
  72.            iCount=iCount+1
  73.            Call SetUIElement(iCount,s)
  74.         end if
  75.     next
  76.  end if
  77. end sub
  78.  
  79.  
  80. Sub WriteRegistry
  81.  Dim iMyCount
  82.      iMyCount=0
  83.  
  84.  for i=1 to iCount
  85.      if len(GetUIElement(i))>0 then iMyCount=iMyCount+1
  86.  next
  87.  
  88.  Dim aryLoc()
  89.  ReDim aryLoc(iMyCount-1)
  90.  
  91.  Dim iMyAryCount
  92.      iMyAryCount=0
  93.      
  94.  for i=1 to iCount
  95.      s=GetUIElement(i)
  96.      if len(s)>0 then 
  97.         aryLoc(iMyAryCount)=s
  98.         iMyAryCount=iMyAryCount+1
  99.      end if
  100.  next
  101.  
  102.  Call RegWriteValue(sV,aryLoc,5)
  103. End Sub
  104.  
  105.  
  106. Sub Plugin_Terminate 
  107. End Sub
  108.  
  109.  
  110.  
  111.